<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    String tokenValue = new Date().getTime() + "";
    session.setAttribute("token", tokenValue);
%>

<form action="<%= request.getContextPath()%>/tokenServlet" method="post">

    <input type="hidden" name="token" value="<%= tokenValue%>"/>

    name:<input type="text" name="name"/>
    <input type="submit" value="提交"/>
</form>

</body>
</html>
